@import './variables';

// reset
* {
  box-sizing: border-box;
  outline: none;
}

html {
  overflow: hidden;
  width: 100%;
  height: 100%;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  //   line-height: 1.2em;
  background: #000;
  -webkit-font-smoothing: antialiased;
  width: 100%;
  height: 100%;

}



@each $colorKey,
$color in $colors {
  .text-#{$colorKey} {
    color: $color;
  }

  .bg-#{$colorKey} {
    background-color: $color;
  }
}

// text align
@each $var in (left, center, right) {
  .text-#{$var} {
    text-align: $var !important;
  }
}

@each $sizeKey,
$size in $font-sizes {
  .fs-#{$sizeKey} {
    font-size: $size * $base-font-size;
  }
}

// text overflow
.text-ellipsis {
  display: inline-block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

// width, height
.w-100 {
  width: 100%;
}

.h-100 {
  height: 100%;
}

// flex
.d-flex {
  display: flex;
}

.flex-column {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

@each $key,
$value in $flex-jc {
  .jc-#{$key} {
    justify-content: $value;
  }
}

@each $key,
$value in $flex-ai {
  .ai-#{$key} {
    align-items: $value;
  }
}

.flex-1 {
  flex: 1;
}

.flex-grow-1 {
  flex-grow: 1;
}

// m-0, mx-0
@each $typeKey,
$type in $spacing-types {

  // .m-1
  @each $sizeKey,
  $size in $spacing-sizes {
    .#{$typeKey}-#{$sizeKey} {
      #{$type}: $size * $spacing-base-size;
    }
  }

  // .mx-1 , .my-1
  @each $sizeKey,
  $size in $spacing-sizes {
    .#{$typeKey}x-#{$sizeKey} {
      #{$type}-left: $size * $spacing-base-size;
      #{$type}-right: $size * $spacing-base-size;
    }

    .#{$typeKey}y-#{$sizeKey} {
      #{$type}-top: $size * $spacing-base-size;
      #{$type}-bottom: $size * $spacing-base-size;
    }
  }

  // .mt-1
  @each $directionKey,
  $direction in $spacing-directions {

    @each $sizeKey,
    $size in $spacing-sizes {
      .#{$typeKey}#{$directionKey}-#{$sizeKey} {
        #{$type}-#{$direction}: $size * $spacing-base-size;
      }
    }
  }
}